import { api } from '../../api/index';
import { goTo } from '../../utils/index';

const app = getApp();

Page({
    mixins: [
        require("../../js/test.js"),
        require("../../js/test2.js")
    ],
    data: {
      page: 'index',
      group: [{
        title: '直播类',
        list: [{
          image: 'http://cdn.mlzgldr.icu/meizanchen/meizanchen_demo.jpg',
          des: '美赞臣直播',
          path: '/packages/meizanchen/pages/index/index'
        }]
      }]
    },
    onLoad(option) {
        console.log('onLoad')
        console.log(this.data)
    },
    onLoadAsync(option) {
        console.log('onLoadAsync')
    },
    onShow(option) {
        console.log('onShow')
    },
    goHome2() {
      goTo({
        url: '/pages/index2/index'
      })
    },
    goTopbar() {
      goTo({
        url: '/packages/demo/pages/topbar/index'
      })
    },
    onGo(e) {
      const { currentTarget: { dataset: {item}}} = e;
      goTo({
        url: item.path
      });
    }
});
